package org.playground.booking.utils;

public class PlaygroundBookingException extends Exception {

    private int errorCode;
    //add error code

    public PlaygroundBookingException(PlaygroundBookingErrMsg errorMessage){
        super(errorMessage.getErrorMessage());
        this.errorCode = errorMessage.getErrorCode();
    }

    public PlaygroundBookingException(String errorMessage){
        super(errorMessage);
        this.errorCode = 0;
    }

    public int getErrorCode() {
        return errorCode;
    }
}
